第六章
一、遇到的问题
问题1: 无法启动Service,其中配置文件里配置的service和启动代码如下:
问题2:Unable to resolve target 'android-2'
问题3:Invalid start tag LinearLayout
问题4:INSTALL_FAILED_INSUFFICIENT_STORAGE
问题5:No Space left on device
问题6:Could not open the editor: Resource is out of sync with the file system
二、解决方法
问题1:去掉配置文件里的配置service,直接启动代码如下:
问题2:安装低版本的api,再default.properties 这个文件中把target=android-2 改成 target=android-7终于就没有问题了。
问题3:main.xml放错文件夹了,应该在\res\layout下。
问题4:原因:SD卡内存容量不够
法一:在“Additional Emulator Command Line Options”中加上“-partition-size 128”
法二:启动模拟器,然后进入菜单
settings->applications->mange applications-> select the application->select "unistall".
这样就能彻底删除了,然后再重新安装这个apk就没问题了
问题5:清除C:\Users\Lanyan\AppData\Local\Temp\AndroidEmulator文件夹下的tmp文件
问题6:解决方法:右击工程,Refresh一下就好了。原因:Usually happens when some files are edited outside of eclipse。